Optimal. Leaf size=83 \[ \frac {\cos ^3(c+d x) (a+a \sec (c+d x))^{2+n}}{3 a^2 d}-\frac {(4-n) \, _2F_1(3,2+n;3+n;1+\sec (c+d x)) (a+a \sec (c+d x))^{2+n}}{3 a^2 d (2+n)} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.05, antiderivative size = 83, normalized size of antiderivative = 1.00, number of steps
used = 3, number of rules used = 3, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.143, Rules used = {3958, 79, 67}
\begin {gather*} \frac {\cos ^3(c+d x) (a \sec (c+d x)+a)^{n+2}}{3 a^2 d}-\frac {(4-n) (a \sec (c+d x)+a)^{n+2} \, _2F_1(3,n+2;n+3;\sec (c+d x)+1)}{3 a^2 d (n+2)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 67
Rule 79
Rule 3958
Rubi steps
\begin {align*} \int (a+a \sec (c+d x))^n \sin ^3(c+d x) \, dx &=-\frac {\text {Subst}\left (\int \frac {(-a-a x) (a-a x)^{1+n}}{x^4} \, dx,x,-\sec (c+d x)\right )}{a^2 d}\\ &=\frac {\cos ^3(c+d x) (a+a \sec (c+d x))^{2+n}}{3 a^2 d}+\frac {(4-n) \text {Subst}\left (\int \frac {(a-a x)^{1+n}}{x^3} \, dx,x,-\sec (c+d x)\right )}{3 a d}\\ &=\frac {\cos ^3(c+d x) (a+a \sec (c+d x))^{2+n}}{3 a^2 d}-\frac {(4-n) \, _2F_1(3,2+n;3+n;1+\sec (c+d x)) (a+a \sec (c+d x))^{2+n}}{3 a^2 d (2+n)}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.10, size = 67, normalized size = 0.81 \begin {gather*} \frac {\left ((2+n) \cos ^3(c+d x)+(-4+n) \, _2F_1(3,2+n;3+n;1+\sec (c+d x))\right ) (1+\sec (c+d x))^2 (a (1+\sec (c+d x)))^n}{3 d (2+n)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [F]
time = 0.28, size = 0, normalized size = 0.00 \[\int \left (a +a \sec \left (d x +c \right )\right )^{n} \left (\sin ^{3}\left (d x +c \right )\right )\, dx\]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: RuntimeError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int {\sin \left (c+d\,x\right )}^3\,{\left (a+\frac {a}{\cos \left (c+d\,x\right )}\right )}^n \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________